package com.zzc.service;

import com.zzc.common.JsonResult;
import com.zzc.common.TableResult;
import com.zzc.pojo.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerService {
    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    /**
     * 添加客户
     * @param record
     * @return
     */
    JsonResult insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer id);

    /**
     * 修改客户信息
     * @param record
     * @return
     */
    JsonResult updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKeyWithBLOBs(Customer record);

    int updateByPrimaryKey(Customer record);

    /**
     * 动态查询客户信息
     * @param page
     * @param limit
     * @param name
     * @param state
     * @return
     */
    TableResult getCustomer(Integer page, Integer limit, String name, Integer state);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    JsonResult deleteCustomersById(Integer[] ids);


    /**
     * 查询全部客户的nickname
     * @return
     */
    List<Customer> getAllCustomer();
}